package spring.cloud.nacos.controller;

import com.alibaba.fastjson.JSON;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import spring.cloud.nacos.entity.NacosConfig;

import javax.annotation.Resource;

@RestController
@RequestMapping("/nacos")
public class NacosController {

    @Resource
    private NacosConfig nacosConfig;

    @GetMapping("/simple")
    public String getNacosConfig() {
        return JSON.toJSONString(nacosConfig);
    }

}
